﻿@model List<CleverCMS.Cms.Services.ViewModels.ObjectRatingViewModel>

@section TitleContent
{
    Posts Rating
}

<div class="widget green">
    <div class="widget-title">
        <h4><i class="icon-reorder"></i> Blog Rating</h4>
    </div>
    <div class="widget-body">
        <div class="module_content">
            <div id="jtable-blog-rating">
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">
    $(document).ready(function () {
        $('#jtable-blog-rating').jtable({
            paging: true,
            pageSize: 12,
            actions: {
                listAction: '@Url.Action("ListPosts", "Rating")',
            },
            fields: {
                Id: {
                    title: "Id",
                    key: true,
                    create: false,
                    edit: false,
                    list: true,
                    width: '5%'
                },
                Title: {
                    title: 'Title',
                    width: '55%'
                },
                Alias: {
                    title: 'Alias',
                    width: '30%'
                },
                Avg: {
                    title: 'Avg',
                    width: '5%'
                },
                People: {
                    title: 'People',
                    width: '5%'
                }
            }
        });
        
        $('#jtable-blog-rating').jtable('load');
    });
</script>